<?php

/**
 * Description of acl
 *
 * @author Kishore
 */
require_once '../config/config.php';
//require_once '../classes/userManager.php';

class acl {
    private $acluser;

    
    public function getPermissions() {
        
        $user = new User();
        $email = 'foo@bar';
        $this->acluser->setEmail($email);

        $user->setUserid(1);

        $stmt = "SELECT m.*, a.canopen, a.canadd, a.canedit, a.candelete, a.canreport " .
                "  FROM modules m " .
                "  JOIN acl a " .
                "    ON a.moduleid = m.moduleid AND a.userid = :userid " .
                " WHERE email = :email ";

        $sth = $this->conn->prepare($stmt);
        $sth->bindParam(':userid', $user->getUserid(), PDO::PARAM_STR);
        $sth->execute();
    }

}

?>
